
#include <iostream>
#include <immintrin.h>
#include "imesh.h"

extern FILE* yyin;
extern CMesh* gMesh;
int yyparse();

using namespace std;

void errLex(){
    cerr << "LEXICAL ERROR" << endl;
    throw "Lexical error";
}

void errSyn(){
    cerr << "SYNTACTIC ERROR" << endl;
    throw "Syntactic error";
}

void errSem(){
    cerr << "SEMANTIC ERROR" << endl;
    throw "Semantic error";
}


CMesh::CMesh(const char* fName)
{
    fopen_s(&yyin, fName, "r");
    int err = yyparse();
    fclose(yyin);

    if(err)
        throw err;
}